<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" import="java.util.List"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
	prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
	prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
	prefix="logic"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
	<head>
		<title>JSP for SysTeamForm form</title>
		<LINK href="css/default.css" rel=stylesheet>
		<LINK href="css/button.css" rel=stylesheet>
		<script language="javascript" type="text/javascript">
		function show(){
		id1.style.height=document.body.scrollHeight+"px";
		id1.style.width=document.body.scrollWidth+"px";
		id1.style.display='block';
		id2.style.display='block';
		}
		function changeselect(obj){
		  if( obj=='id1')
		  {
		     if (id1.style.display=='none')
		        id1.style.display='block';
		     else
		        id1.style.display='none'; 
		        return;  
		  }

		  //id2.style.display='none';
		  id3.style.display='none';
		  id4.style.display='none';
		  id5.style.display='none';
		  //id6.style.display='none';
		  
		  document.getElementById(obj).style.display='block';
		}
		
		function switchdiv(obj){
		   
		   var actobj=document.getElementById(obj);
		   //alert(actobj.style.display);
		   if(actobj.style.display=='none')
		      actobj.style.display='block';
		   else
		      actobj.style.display='none';
		}
		
		function hide(){
		id1.style.display='none';
		id2.style.display='none';
		}
		function opchange(o){
		document.campcontForm.method.value=o;
		document.campcontForm.submit();
		}
		function cancelsub(){
			hide();
		}
		</script>
	</head>
	<body
		onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">

		<html:form action="/campcont">
			<%
				List indexes = (List) session.getAttribute("allidlist");
				int cutindex = Integer.parseInt(request.getAttribute("indexid")
						.toString());
			%>
<br/>

			<table width="880" cellspacing="0" cellpadding="0" align="center"
				border="0">
				<tbody>
					<tr>
						<td width="3" height="31">
							<img height="31" src="./images/table_01.gif" width="3" />
						</td>
						<td background="./images/table_02.gif" height="31">
							<table cellspacing="0" cellpadding="0" width="149" align="left"
								border="0">
								<tbody>
									<tr>
										<td width="51" background="./images/title_1_bg.gif">
											<img height="31" src="./images/title_1.gif" width="51" />
										</td>
										<td width="95" background="./images/title_1_bg.gif">
											<span class="color_b_666">外呼信息</span>
										</td>
										<td background="./images/title_1_bg.gif">
                          
										</td>
									</tr>
								</tbody>
							</table>
						</td>
						<td width="3">
							<img height="31" src="./images/table_03.gif" width="3" />
						</td>
					</tr>
					<tr>
						<td width="3" background="./images/table_04.gif" width="3"
							align="right">
							<img height="100%" src="./images/table_04.gif" width="3" />
						</td>
						<td>
							<logic:notPresent name="campcustinfolist">
										  <img src="images/li2.gif" /> 对不起，没有满足条件的记录,请重新打开外呼界面选择.
										   <hr>
							</logic:notPresent>
							<logic:present name="campcustinfolist">
								<div align="center" id="id2">
									<table width="770" border="0" align="center" cellpadding="5"
										cellspacing="1" bgcolor="#FF9900">
										<tr><td colspan=2>
										<logic:present name="campid">
						  <img src="images/self_2.gif" height="20" />本波次中 
                           <select name="custtype" id="custtype"
															onchange="opchange('list')">
															<logic:equal name="custtype" value="all">
																<option value="all">
																	全部客户
																</option>
															</logic:equal>
															<logic:equal name="custtype" value="appoint">
																<option value="appoint">
																	预约客户
																</option>
															</logic:equal>
															<logic:equal name="custtype" value="morning">
																<option value="morning">
																	推荐上午访问客户
																</option>
															</logic:equal>
															<logic:equal name="custtype" value="afternoon">
																<option value="afternoon">
																	推荐下午访问客户
																</option>
															</logic:equal>
															<logic:equal name="custtype" value="night">
																<option value="night">
																	推荐晚上访问客户
																</option>
															</logic:equal>
															<logic:equal name="custtype" value="notouch">
																<option value="notouch">
																	尚未接触客户
																</option>
															</logic:equal>
															<logic:equal name="custtype" value="nocomm">
																<option value="nocomm">
																	尚未沟通客户
																</option>
															</logic:equal>
															<option value="all">
																全部客户
															</option>
															<option value="appoint">
																预约客户
															</option>
															<option value="morning">
																推荐上午访问客户
															</option>
															<option value="afternoon">
																推荐下午访问客户
															</option>
															<option value="night">
																推荐晚上访问客户
															</option>
															<option value="notouch">
																尚未接触客户
															</option>
															<option value="nocomm">
																尚未沟通客户
															</option>
														</select>
                              共有<font color="#0000ff"><%=indexes.size()%>
														</font>条外呼名单,现在是第<font color="#0000ff"><%=cutindex + 1%> </font>条名单。
													</logic:present>
										</td></tr>
										<tr><th></th></tr>
										<tr><td colspan=2></td></tr>
										
										<tr>
											<td valign="top">
												<bean:define id="tname" value="start" />
												<bean:define id="flag" value="3" />
												<%
												int lineflag = -1;
												int tableflag=0;
												%>
												<logic:present name="campadvinfolist">
													<table width="375" border="0" align="center"
														cellpadding="5" cellspacing="1" bgcolor="#FF9900">
														<tr align="left">
															<th>
																<img src="images/rabit.gif"  style="cursor:hand;" title="展开/收缩" width="20" height="15"  onclick="switchdiv('sh营销建议区')" />营销建议区
															</th>
														</tr>
													</table>
													<div id="sh营销建议区" style="display:block">
													<table width="375" border="0" align="center"
														cellpadding="5" cellspacing="1" bgcolor="#FF9900">
														<logic:iterate name="campadvinfolist" id="cail">
															<tr>
																<td>
																	<bean:write name="cail" />
																</td>
															</tr>
														</logic:iterate>
														</logic:present>
														</table>
														</div>
														</td>
									      <td valign="top">
														<table width="375" border="0" align="center"
														cellpadding="5" cellspacing="1" bgcolor="#FF9900">
														<tr  align="left">
															<th>
																<img src="images/rabit.gif"  style="cursor:hand;" title="展开/收缩" width="20" height="15"  onclick="switchdiv('sh子产品列表')" />子产品列表
															</th>
														</tr>
														</table>
														<div id="sh子产品列表" style="display:block">
														<table width="375" border="0" align="center"
														cellpadding="5" cellspacing="1" bgcolor="#FF9900">
														<logic:present name="accsnbrlist">
															<tr>
																<%int tflag=-1; %>
																	<logic:iterate name="accsnbrlist" id="anl">
																	
																	<%
																	if(tflag==3)
																	   out.print("</tr><tr>");
																	tflag=(tflag+1)%4; 
																	%>
																		<td>
																		<img src="images/li2.gif" /><a
																			href="prdview.do?method=list&nbrtype=accsnbr&nbr=<bean:write name="anl" />"
																			target="_blank"><bean:write name="anl" /> </a>
																		</td>
																	</logic:iterate>
																	<%  while(tflag++<4) out.print("<td></td>"); %>
																
															</tr>
														</logic:present>
														</table>
														</div>
										 </td>
										</tr>
														
										<tr><td  valign="top">
											<logic:iterate name="campcustinfolist" id="ccil">
                                              <logic:notEqual name="tname" value="${ccil.showAreaName}">
													  <logic:notEqual name="tname" value="start">
													    <%if(1==lineflag) out.print("<td></td>"); %>	
													    </tr></table></div><%tableflag=(tableflag+1)%2; 
													          if (0==tableflag){%>
													             </tr> <tr>
													          <%}%>
														    </td><td valign="top"><%lineflag = -1;%>
												      </logic:notEqual>
												    <bean:define id="tname" value="${ccil.showAreaName}" />
											    	<table width="375" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#FF9900">
													  <tr>
														  <th colspan="2" align="left"><img src="images/rabit.gif"  style="cursor:hand;" width="20" height="15" onclick="switchdiv('sh<bean:write name="ccil" property="showAreaName" />')" />
															<bean:write name="billingcycleid" />
															－
															<bean:write name="ccil" property="showAreaName" />
														  </th>
													  </tr>
													  
													  </table>
													  <div id="sh<bean:write name="ccil" property="showAreaName" />" style="display:block">
													  <table width="375" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#FF9900">
													  
											   </logic:notEqual>
													<% if (lineflag == -1) { %>
													<tr bgcolor="ffffff">
														<% lineflag++;
															} else if (lineflag == 0) { %>
													</tr>
													<tr bgcolor="ffffff">
														<% } %>
														<td>
															<bean:write name="ccil" property="bizAtomName" />
															:
															<logic:equal name="ccil" property="bizAtomValue"
																value="是">
																<input type="checkbox" checked
																	onclick="this.checked=!this.checked" />
															</logic:equal>
															<logic:equal name="ccil" property="bizAtomValue"
																value="否">
																<input type="checkbox"
																	onclick="this.checked=!this.checked" />
															</logic:equal>
															<logic:notEqual name="ccil" property="bizAtomValue"
																value="否">
																<logic:notEqual name="ccil" property="bizAtomValue"
																	value="是">
																	<b><bean:write name="ccil" property="bizAtomValue" />
																	</b>
																</logic:notEqual>
															</logic:notEqual>

														</td>
														<%
														lineflag = (lineflag + 1) % 2;
														%>
														</logic:iterate>
													<%if(1==lineflag) out.print("<td></td>"); %>	
													</tr>
													
												</table></div>

											</td>
											<%if(0==tableflag) out.print("<td></td>"); %>	
											
										</tr>
										<tr><th colspan=2></th></tr>
										<tr><td colspan=2></td></tr>
										<tr>
											<td>
												输入要搜索的号码：
												<input type="text" name="searchnbr">
												<img src='images/search2.gif' style="cursor:hand;" title='我要搜索' width=50 height=15 onclick="opchange('det')" />
												
											</td>
											<td>
											    设定默认周期：
                                                       <select name="billingcycleid" id="billingcycleid"
															onchange="opchange('det')">
															<option value="<bean:write name="billingcycleid" />">
																<bean:write name="billingcycleid" />
															</option>
															<%
																	//for (int i = 200712; i >= 200701; i--)
																	//out.print("<option value='" + i + "'>" + i + "</option>");
															%>
														</select>
												<a 
													href="campcont.do?method=det&campid=${campid}&campseqid=${campseqid}&userid=${userid}&indexid=0&custtype=${custtype}&billingcycleid=${billingcycleid}">
													<img title="第一条" border="no" src="images/first.gif" /></a>

												<a
													href="campcont.do?method=det&campid=${campid}&campseqid=${campseqid}&userid=${userid}&custtype=${custtype}&billingcycleid=${billingcycleid}&indexid=<%=(0 == cutindex ? 0 : cutindex - 1)%>">
													<img title="上一条" border="no" src="images/prev.gif" /></a>

												<a
													href="campcont.do?method=det&campid=${campid}&campseqid=${campseqid}&userid=${userid}&custtype=${custtype}&billingcycleid=${billingcycleid}&indexid=<%=(cutindex + 1 == indexes.size() ? cutindex
									: cutindex + 1)%>">
													<img title="下一条" border="no" src="images/next.gif" /></a>

												<a
													href="campcont.do?method=det&campid=${campid}&campseqid=${campseqid}&userid=${userid}&custtype=${custtype}&billingcycleid=${billingcycleid}&indexid=<%=(indexes.size() - 1)%>">
													<img title="最后一条" border="no" src="images/last.gif" /></a>
											</td>
										</tr>
										<tr>
											<td colspan="2">
												<div align="center" id="control">
													<input class=btn_mouseout type="button"
														onmouseover="this.className=&#39;btn_mouseover&#39;"
														onmouseout="this.className=&#39;btn_mouseout&#39;"
														onmousedown="this.className=&#39;btn_mousedown&#39;"
														onmouseup="this.className=&#39;btn_mouseup&#39;"
														value="接触结果反馈" onclick="changeselect('id3')">
													<input class=btn_mouseout type="button"
														onmouseover="this.className=&#39;btn_mouseover&#39;"
														onmouseout="this.className=&#39;btn_mouseout&#39;"
														onmousedown="this.className=&#39;btn_mousedown&#39;"
														onmouseup="this.className=&#39;btn_mouseup&#39;"
														value="商机信息速记" onclick="changeselect('id4')">
													<input class=btn_mouseout type="button"
														onmouseover="this.className=&#39;btn_mouseover&#39;"
														onmouseout="this.className=&#39;btn_mouseout&#39;"
														onmousedown="this.className=&#39;btn_mousedown&#39;"
														onmouseup="this.className=&#39;btn_mouseup&#39;"
														value="营销脚本查询" onclick="changeselect('id5')">
												</div>
											</td>
										</tr>
									</table>
									
								</div>
							</logic:present>
						</td>
						<td background="./images/table_05.gif" width="3" align="left">
							<img height="100%" src="./images/table_05.gif" width="3">
						</td>
					</tr>
					<tr>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_06.gif" width="3px">
						</td>
						<td height=3 valign="top">
							<img height="3px" src="./images/table_07.gif" width="100%">
						</td>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_08.gif" width="3px">
						</td>
					</tr>
				</tbody>
			</table>

			<div align="center" id="id3">
				<logic:present name="campid">
					<iframe name="showcontrslt"
						src="campcontrslt.do?method=list&campid=<bean:write name="campid" />&campseqid=<bean:write name="campseqid" />&indexid=<bean:write name="indexid" />"
						frameborder="0" width="880" height="800"></iframe>
				</logic:present>
			</div>

			<div align="center" id="id4" style="display: none">
				<iframe name="showcontrslt"
					src="bizinfo.do?method=list&indexid=<bean:write name="indexid" />"
					frameborder="0" width="880" height="800"></iframe>
			</div>

			<div align="center" id="id5" style="display: none">
				<logic:present name="scriptfile">
					<iframe name="scriptfile" src="<bean:write name="scriptfile" />"
						frameborder="0" width="880" height="800"></iframe>
				</logic:present>
			</div>


			<div align="center" id="commit">
				<html:hidden property="method" value="det" />
				<html:hidden property="campid" value="${campid}" />
				<html:hidden property="userid" value="${userid}" />
				<html:hidden property="campseqid" value="${campseqid}" />

			</div>
		</html:form>
	</body>
</html>

